Skip to content
This repository has been archived by the owner on Aug 11, 2022. It is now read-only.

npm ERR! network connect ETIMEDOUT #11956

Closed
Tefofo opened this issue Mar 18, 2016 · 15 comments
Closed

npm ERR! network connect ETIMEDOUT #11956

Tefofo opened this issue Mar 18, 2016 · 15 comments

Comments

@Tefofo
Copy link

Tefofo commented Mar 18, 2016

Hi,
I am behind a proxy and I would like to install ionic, any ideas on how to configure my proxy settings?
Below is the error trace I get:-

6 silly cache add args [ 'ionic', null ]
7 verbose cache add spec ionic
8 silly cache add parsed spec Result {
8 silly cache add raw: 'ionic',
8 silly cache add scope: null,
8 silly cache add name: 'ionic',
8 silly cache add rawSpec: '',
8 silly cache add spec: 'latest',
8 silly cache add type: 'tag' }
9 silly addNamed ionic@latest
10 verbose addNamed "latest" is being treated as a dist-tag for ionic
11 info addNameTag [ 'ionic', 'latest' ]
12 silly mapToRegistry name ionic
13 silly mapToRegistry using default registry
14 silly mapToRegistry registry https://registry.npmjs.org/
15 silly mapToRegistry uri https://registry.npmjs.org/ionic
16 verbose addNameTag registry:https://registry.npmjs.org/ionic not in flight; fetching
17 verbose request uri https://registry.npmjs.org/ionic
18 verbose request no auth needed
19 info attempt registry request try #1 at 12:05:33 PM
20 verbose request id 7cf1b2717a250899
21 http request GET https://registry.npmjs.org/ionic
22 info retry will retry, error on last attempt: Error: connect ETIMEDOUT 185.31.18.162:443
23 info attempt registry request try #2 at 12:06:05 PM
24 http request GET https://registry.npmjs.org/ionic
25 info retry will retry, error on last attempt: Error: connect ETIMEDOUT 185.31.18.162:443
26 info attempt registry request try #3 at 12:07:26 PM
27 http request GET https://registry.npmjs.org/ionic
28 verbose stack Error: connect ETIMEDOUT 185.31.19.162:443
28 verbose stack at Object.exports._errnoException (util.js:870:11)
28 verbose stack at exports._exceptionWithHostPort (util.js:893:20)
28 verbose stack at TCPConnectWrap.afterConnect as oncomplete
29 verbose cwd C:\Windows\system32
30 error Windows_NT 6.1.7601
31 error argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "install" "-g" "ionic"
32 error node v4.4.0
33 error npm v2.14.20
34 error code ETIMEDOUT
35 error errno ETIMEDOUT
36 error syscall connect
37 error network connect ETIMEDOUT 185.31.19.162:443
37 error network This is most likely not a problem with npm itself
37 error network and is related to network connectivity.
37 error network In most cases you are behind a proxy or have bad network settings.
37 error network
37 error network If you are behind a proxy, please make sure that the
37 error network 'proxy' config is set properly. See: 'npm help config'
38 verbose exit [ 1, true ]

@MantasR
Copy link

MantasR commented Mar 18, 2016

Same problem with multiple packages.

Tried npm cache clean
Also tired switching to miror resgistry.

Also tried clean install of both npm and nodejs on fresh linux ubuntu-15.04-x86_64

However it was working few days ago. Must be a recent change

EDIT:
However it works fine on my windows laptop...

Anyone knows what an issue could be?

@iyogeshjoshi
Copy link

@Tefofo @MantasR I think you guys are not properly connected to internet or behind a proxy which is not allowing your machine to access npm repos, as clearly mentioned in your error message.

Try connecting to some other network or make sure that your machine have access to internet and then try again.

@MantasR
Copy link

MantasR commented Mar 21, 2016

@iyogeshjoshi The thing is that I was experiencing this on my server.

And as I said I tried a fresh, clean server as well (with freshly installed linux).

However, everything works fine today for me...
I haven't made any changes..

@Tefofo
Copy link
Author

Tefofo commented Mar 22, 2016

@iyogeshjoshi I am properly connected to the internet and yes I am behind a proxy, that is why I am asking the question that is there a way for me to install ionic behind a proxy server

@MantasR
Copy link

MantasR commented Mar 22, 2016

@Tefofo Have you tried:
npm config set proxy "http://username:password@servername:port/"

@Tefofo
Copy link
Author

Tefofo commented Mar 22, 2016

Hi @MantasR
I have tried that as well as npm config set http-proxy "http://username:password@servername:port/"
It still does not work

@Tefofo
Copy link
Author

Tefofo commented Mar 22, 2016

sorry https-proxy "http://username:password@servername:port/"

@MantasR
Copy link

MantasR commented Mar 23, 2016

Not sure then...

But just to confirm, have you changed username, password, servername and port to your actual username, password, servername and port?

@Tefofo
Copy link
Author

Tefofo commented Mar 24, 2016

Hi @MantasR ,
I am not sure let me try that then I will get back to you

@zkat zkat added the support label Mar 25, 2016
@waltertamboer
Copy link

I'm experiencing this error as well but I'm not behind a proxy.

OS: Fedora 23
Node version: v4.4.3
NPM version: 3.8.6

@smmuneeb
Copy link

smmuneeb commented Mar 6, 2017

Guys any updates on this issue. I tried following but no luck.
npm config set proxy false
npm cache clean

@maurizioprazzoli
Copy link

Hi to all, I've solved upgrading npm.

See link below:
http://stackoverflow.com/a/39813849

@sreesindhusruthiyadavalli
Copy link

I have npm -3.10.10 and node 6.11.0 in Windows 2012 server and not having any proxy but still used
npm set proxty false
npm clear cache
Still facing the error.

Any help is appreciated.

@npm-robot
Copy link

We're closing this support issue as it has gone three days without activity. The npm CLI team itself does not provide support via this issue tracker, but we are happy when users help each other here. In our experience once a support issue goes dormant it's unlikely to get further activity. If you're still having problems, you may be better served by joining package.community and asking your question there.

For more information about our new issue aging policies and why we've instituted them please see our blog post.

@leorotondano
Copy link

leorotondano commented Jul 26, 2017

I used the node-v6.11.1-x64.msi for installing node and npm and had the same problem.
But, as people already told, I updated npm by executing the following command on my Windows prompt (as Administrator):
npm install npm@latest -g

That solved my problem.

Stackoverflow link to the solution:
https://stackoverflow.com/questions/26908899/how-do-i-update-npm-on-windows/39813849#39813849

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

10 participants